home *** CD-ROM | disk | FTP | other *** search
- rem $linesize:132
- rem $title:'Application Engineer Standard Routines'
- rem $subtitle:'Create an index (quiet)'
- rem $include:'aeshared.bas'
- '
- ' bit.creatq completed on 8-apr-1986. copy of bit.creat but with
- ' parameters passed in sub-routine invocation.
- '
- ' Modified 5-Jan-87 to open files for output on creation so that
- ' if files exist, they'll be truncated.
-
- sub bit.creatq(fl%,flnm$,key.length%) static
- idxk%=key.length%
- hdr$=flnm$
- aesb.warning%=1%
- while idxk%>3% and idxk%<256%
- while hdr$<>""
- mas$=hdr$+".idx"
- hdr$=hdr$+".hdr"
- recsize%=idxk%+2+2+2+2+2
- open "o",fl%,hdr$
- close fl%
- open "r",fl%,hdr$,512
- field #fl%,32 as desc$,32 as xmast$,2 as klen$,2 as nok$,2 as nexav$
- field #fl%,70 as twit$,2 as kdel$,440 as spare$
- lset desc$="(c) R.Barrow 1986,1987"+chr$(26)
- lset xmast$=mas$
- lset klen$=mki$(idxk%)
- lset nok$=mki$(0)
- lset nexav$=mki$(1)
- lset kdel$=mki$(0)
- put fl%,1%
- close fl%
- open "o",fl%,mas$
- close fl%
- open "r",fl%,mas$,recsize%
- field #fl%,recsize% as dummy$
- lset dummy$=string$(recsize%,0%)
- put #fl%,1%
- close fl%
- aesb.warning%=0%
- hdr$=""
- wend
- idxk%=0%
- wend
- end sub
-